package com.LearnInWorld.video.feign;

import com.LearnInWorld.entity.Result;
import com.LearnInWorld.video.pojo.Video;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient(name = "LearnInWorld-service-video",contextId = "videoClient")
@RequestMapping("/video")
@Repository
public interface VideoFeign {

    @GetMapping
    Result<List<Video>> findAll();

    @GetMapping("/findById/{videoId}")
    Result<Video> findById(@PathVariable("videoId") String videoId);

}
